package com.ruoyi.framework.service.impl;

import java.util.List;
import java.time.LocalDateTime;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.framework.mapper.FrameworkSdkInfoMapper;
import com.ruoyi.framework.domain.FrameworkSdkInfo;
import com.ruoyi.framework.service.IFrameworkSdkInfoService;

/**
 * sdk信息Service业务层处理
 *
 * @author ruoyi
 * @date 2025-02-24
 */
@Service
public class FrameworkSdkInfoServiceImpl implements IFrameworkSdkInfoService {
    @Autowired
    private FrameworkSdkInfoMapper frameworkSdkInfoMapper;

    /**
     * 查询sdk信息
     *
     * @param id sdk信息主键
     * @return sdk信息
     */
    @Override
    public FrameworkSdkInfo selectFrameworkSdkInfoById(Long id) {
        return frameworkSdkInfoMapper.selectFrameworkSdkInfoById(id);
    }

    /**
     * 查询sdk信息列表
     *
     * @param frameworkSdkInfo sdk信息
     * @return sdk信息
     */
    @Override
    public List<FrameworkSdkInfo> selectFrameworkSdkInfoList(FrameworkSdkInfo frameworkSdkInfo) {
        return frameworkSdkInfoMapper.selectFrameworkSdkInfoList(frameworkSdkInfo);
    }

    /**
     * 新增sdk信息
     *
     * @param frameworkSdkInfo sdk信息
     * @return 结果
     */
    @Override
    public int insertFrameworkSdkInfo(FrameworkSdkInfo frameworkSdkInfo) {
        frameworkSdkInfo.setCreateTime(LocalDateTime.now());
        return frameworkSdkInfoMapper.insertFrameworkSdkInfo(frameworkSdkInfo);
    }

    /**
     * 修改sdk信息
     *
     * @param frameworkSdkInfo sdk信息
     * @return 结果
     */
    @Override
    public int updateFrameworkSdkInfo(FrameworkSdkInfo frameworkSdkInfo) {
        frameworkSdkInfo.setUpdateTime(LocalDateTime.now());
        return frameworkSdkInfoMapper.updateFrameworkSdkInfo(frameworkSdkInfo);
    }

    /**
     * 批量删除sdk信息
     *
     * @param ids 需要删除的sdk信息主键
     * @return 结果
     */
    @Override
    public int deleteFrameworkSdkInfoByIds(Long[] ids) {
        return frameworkSdkInfoMapper.deleteFrameworkSdkInfoByIds(ids);
    }

    /**
     * 删除sdk信息信息
     *
     * @param id sdk信息主键
     * @return 结果
     */
    @Override
    public int deleteFrameworkSdkInfoById(Long id) {
        return frameworkSdkInfoMapper.deleteFrameworkSdkInfoById(id);
    }
}
